<?php
/**
 * NOTICE OF LICENSE
 *
 * This source file is subject to the  Academic Free License (AFL 3.0)
 * that is available through the world-wide-web at this URL:
 * http://opensource.org/licenses/afl-3.0.php
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to support@zprofess.com so we can send you a copy immediately.
 *
 * @category   	Prestashop module
 * @package		Review & Rating Synthesis
 * @version 	1.0.2
 * @author 		Rukan <rukanhitokiri@zprofess.com>
 * @copyright   Copyright (c) 2012 ZPROFESS. (http://www.zprofess.com)
 * @license    	http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 * @by 			xuanhoapro
 */

include(dirname(__FILE__).'/../../config/config.inc.php');
include(dirname(__FILE__).'/../../init.php');

global $cookie;

if ($cookie->id_customer){
	$row = Db::getInstance()->getRow('SELECT * FROM `'._DB_PREFIX_.'zalias_custommers`
											WHERE `id_custommers` ='.(int)$cookie->id_customer);
//	echo $row['alias'];
	echo '<p class="required text">
			<label for="alias_custommer">Alias Custommer</label>
			<input type="text" class="text" id="alias_custommer" name="alias_custommer" value="'.$row['alias'].'"><sup></sup>
		</p>
		<p class="radio required">
			<span>Review name display</span>
			<input type="radio" name="alias_active" id="alias_enable" value="2" '.($row['active']==2 ? 'checked="checked"':'').'>
			<label for="alias_enable" class="top">&nbsp;Alias name.</label>
			<input type="radio" name="alias_active" id="alias_disable" value="1" '.($row['active']==2 ? '':'checked="checked"').'>
			<label for="alias_disable" class="top">&nbsp;Real name.</label>
		</p>';
	
}
	


